load("//bzl:cpp_library.bzl", "cpp_library")

package(default_visibility = ["//visibility:public"])

cpp_library(
    name = "atomic_queue",
    hdrs = [
        "AtomicQueue.h",
    ],
    deps = [
        "//folly/lang:assume",
        "@glog",
    ],
)

cpp_library(
    name = "channel_bridge",
    hdrs = ["ChannelBridge.h"],
    deps = [
        "//folly:try",
        "//folly/experimental/channels/detail:atomic_queue",
    ],
)

cpp_library(
    name = "intrusive_ptr",
    hdrs = ["IntrusivePtr.h"],
    deps = [
        "@boost.smart_ptr",
    ],
)

cpp_library(
    name = "multiplexer_traits",
    hdrs = ["MultiplexerTraits.h"],
    deps = [
        "//folly:traits",
        "//folly/functional:traits",
    ],
)

cpp_library(
    name = "pointer_variant",
    hdrs = ["PointerVariant.h"],
    deps = [
        "//folly:demangle",
        "@fmt",
    ],
)

cpp_library(
    name = "utility",
    hdrs = [
        "Utility.h",
    ],
    deps = [
        "//folly:exception_wrapper",
        "//folly:function",
        "//folly:scope_guard",
        "//folly/channels:channel",
        "//folly/channels:rate_limiter",
        "//folly/coro:promise",
        "//folly/coro:task",
        "//folly/executors:sequenced_executor",
    ],
)
